package cn.hqc.basic.utils;

// 业务异常类
public class BussinessException extends RuntimeException{

    private int code;

    private String message;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public BussinessException(String message){
        super(message);
    }

    public BussinessException(GlobalErrorCode code){
        this.code = code.getCode();
        this.message = code.getMessage();
    }
}
